home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / cli / cliutils_mra.lha / Sources / Reboot / ColdReboot.a next >
Encoding:
Text File  |  1997-06-17  |  1.9 KB  |  74 lines

  1. ;
  2. ; $VER: ColdReboot.a V1.0 recoded in 100% assembly
  3. ;
  4. ; ColdReboot v1.0  100% assembly!
  5. ; Written by Mauro Panigada
  6. ;
  7. ; Version without confirmation (see also Reboot.a)
  8. ;
  9. ; (FREEWARE) It needs OS2.0+
  10. ;
  11. ; STARTED: 02/04/1996
  12. ;
  13. ; Original by Max Francis, coded in C (5028 bytes!)
  14. ; USAGE: ColdReboot
  15. ;
  16. ; Perform an immediate cold reboot.
  17. ;
  18. ; NOTE: This is simply a remake from "MF WBTools Reboot.c" by Max Francis,
  19. ; written in C. It is my second remake from Max Francis' program. You can
  20. ; also find DFree and DFree2, the first rough, the second better (and
  21. ; better and better than Max's C version!). The Max version often are
  22. ; copyrighted (or no?), but I note that NO PART OF CODE ARE USED OR STOLEN
  23. ; IN MY OWN VERSION (FREEWARE); I only got C-idea and converted it
  24. ; in a assembly-program.
  25. ;
  26. ; GOOD QUALITIES: My own version's shorter. Very shorter. A question for
  27. ; Max Francis: do you know that a program which only call amiga-system
  28. ; routine for a cold reset (or for getting information, as in DFree)
  29. ; longer than 1000 bytes is obsolete? Kill your C and make assembly alive
  30. ; for these simple programs... Just a suggestion!
  31. ;
  32.  
  33.         incdir    "dh0:progr/assem/include/"
  34.         include    "exec/types.i"
  35.         include    "exec/libraries.i"
  36.         include    "exec/exec_lib.i"
  37.         include    "dos/dos_lib.i"
  38.  
  39.  
  40.         bra.s    start
  41.  
  42.         dc.b    "$VER: ColdReboot v1.0 written by Mauro Panigada"
  43.         dc.b    0
  44.         even
  45.  
  46. start        move.b    d0,d6
  47.         lea    dosname(pc),a1
  48.         moveq    #36,d0
  49.         movea.l    4.w,a6
  50.         jsr    _LVOOpenLibrary(a6)
  51.         tst.l    d0
  52.         beq.s    exit0
  53.         cmp.b    #1,d6
  54.         bne.s    help_scr
  55.         jmp    _LVOColdReboot(a6)
  56. help_scr    move.l    d0,a6
  57.         lea    help(pc),a0
  58.         move.l    a0,d1
  59.         jsr    _LVOPutStr(a6)
  60.         move.l    a6,a1
  61.         move.l    4.w,a6
  62.         jsr    _LVOCloseLibrary(a6)
  63. exit0        rts
  64.  
  65.  
  66. dosname        dc.b    "dos.library",0
  67.         even
  68. help        dc.b    "ColdReboot v1.0 by Mauro Panigada",10
  69.         dc.b    "Original C version written by Max Francis",10
  70.         dc.b    "Perform a cold reboot of the system",10
  71.         dc.b    "USAGE: ColdReboot",10
  72.         dc.b    "(equivalent of <CTRL><A><A>",10,10,0
  73.  
  74.         END